package com.ll.beautymall.bean;

import com.google.gson.Gson;
import com.google.gson.reflect.TypeToken;

import java.io.Serializable;
import java.lang.reflect.Type;
import java.util.ArrayList;
import java.util.List;

/**
 * Created by Administrator on 2016/10/23.
 */
public class Category implements Serializable{

    /**
     * cids : 0
     * crowd_type : 0
     * id : 1464783926
     * pic_url : http://gouwu.cdn.yuike.com/data/img/457465/allbuy_category/0ae29582581f93ea8a0a6165ee94192d.jpg
     * title : 全部
     */

    private String cids;
    private int crowd_type;
    private String id;
    private String pic_url;
    private String title;

    public static Category objectFromData(String str) {

        return new Gson().fromJson(str, Category.class);
    }

    public static List<Category> arrayCategoryFromData(String str) {

        Type listType = new TypeToken<ArrayList<Category>>() {
        }.getType();

        return new Gson().fromJson(str, listType);
    }

    public String getCids() {
        return cids;
    }

    public void setCids(String cids) {
        this.cids = cids;
    }

    public int getCrowd_type() {
        return crowd_type;
    }

    public void setCrowd_type(int crowd_type) {
        this.crowd_type = crowd_type;
    }

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getPic_url() {
        return pic_url;
    }

    public void setPic_url(String pic_url) {
        this.pic_url = pic_url;
    }

    public String getTitle() {
        return title;
    }

    public void setTitle(String title) {
        this.title = title;
    }
}
